#ifndef __LIDAR_TYPE_H__
#define __LIDAR_TYPE_H__

#include <map>
#include <pcl/conversions.h>
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#include <pcl_conversions/pcl_conversions.h>
using XYZI = pcl::PointCloud<pcl::PointXYZI>;
using XYZI_PTR = pcl::PointCloud<pcl::PointXYZI>::Ptr;
using XYZI_1 = pcl::PointXYZI;

using XYZ = pcl::PointCloud<pcl::PointXYZ>;
using XYZ_PTR = pcl::PointCloud<pcl::PointXYZ>::Ptr;
using XYZ_1 = pcl::PointXYZ;

struct LidarPoint
{
    XYZI_PTR points;
    double time;
};
struct LidarDataInType
{
    std::map<int, LidarPoint> point_cloud_ptr_map;
    LidarDataInType()
    {
        point_cloud_ptr_map[0].time = 0;
        point_cloud_ptr_map[1].time = 0;
        point_cloud_ptr_map[2].time = 0;
        point_cloud_ptr_map[3].time = 0;
        point_cloud_ptr_map[4].time = 0;
        point_cloud_ptr_map[0].points.reset(new XYZI);
        point_cloud_ptr_map[1].points.reset(new XYZI);
        point_cloud_ptr_map[2].points.reset(new XYZI);
        point_cloud_ptr_map[3].points.reset(new XYZI);
        point_cloud_ptr_map[4].points.reset(new XYZI);
    }
    void reset()
    {
        point_cloud_ptr_map[0].time = 0;
        point_cloud_ptr_map[1].time = 0;
        point_cloud_ptr_map[2].time = 0;
        point_cloud_ptr_map[3].time = 0;
        point_cloud_ptr_map[4].time = 0;
        point_cloud_ptr_map[0].points.reset(new XYZI);
        point_cloud_ptr_map[1].points.reset(new XYZI);
        point_cloud_ptr_map[2].points.reset(new XYZI);
        point_cloud_ptr_map[3].points.reset(new XYZI);
        point_cloud_ptr_map[4].points.reset(new XYZI);
    }
};
#endif